package com.gzlg;
/**
 *
 
 
 
 
Class.forName("com.mysql.cj.jdbc.Driver");
String url = "jdbc:mysql://localhost:3306/dsschool?useUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=UTC";

 */



import java.sql.*;

public class JdbcUtils {

    private static String url = "jdbc:mysql://localhost:3307/test";
    private static String user = "root";
    private static String password = "123456";
    private static String driverClass = "com.mysql.cj.jdbc.Driver";
    private static Connection conn = null;

    public static Connection getConnection() {
        try {
            Class.forName(driverClass);
            conn = DriverManager.getConnection(url, user, password);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return conn;
    }




}